Page({
  data: {
    type: true,
    isShowPassword: true,
    account: 'xbsj001',
    password: '123456'
  },
  switchType() {
    const type = !this.data.type
    this.setData({type})
  },
  hShowpassword() {
    const isShowPassword = !this.data.isShowPassword
    this.setData({isShowPassword})
  },
  hGetCode() {

  },
  hLogin() {
    this.doLogin()
  },
  async doLogin() {
    const { account, password }  = this.data
    const res = await wx.$http.post('/driver/login/account', {account,password})
    wx.switchTab({
      url: '../index/index',
    })
    console.log(res);
  }
})